import 'package:chathouse/constant/my_color.dart';
import 'package:chathouse/pages/guide/guide_page.dart';
import 'package:chathouse/util/font_utils.dart';
import 'package:chathouse/util/image_utils.dart';
import 'package:chathouse/widgets/form_widgets/form_widgets.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import '../../constant/res.dart';
import 'package:chathouse/util/base_utils.dart';
import 'package:get/get.dart';

import '../client/client_root_container.dart';

//簡介頁
class AboutPage extends StatelessWidget {
  const AboutPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Container(
        color: Colors.white,
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            ImageUtils.image(Res.login_logo, width: 145.w, height: 160.w)
                .setContainer(margin: EdgeInsets.only(top: 44.w)),
            Text(
              "Chat House",
              style: getTextStyle(34.sp,
                  fontType: FontType.MID, color: MyColors.green_5714540),
            ).setContainer(margin: EdgeInsets.only(top: 3.w)),
            Text(
              "屋測測",
              style: getTextStyle(42.sp,
                  fontType: FontType.MID, color: MyColors.green_5714540),
            ).setContainer(margin: EdgeInsets.only(top: 3.w)),
            Expanded(
                child: Container(
              width: 1.sw,
              margin: EdgeInsets.only(top: 4.w),
              color: MyColors.green_8116172,
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.center,
                children: [
                  Text(
                    "簡介",
                    style: getTextStyle(31.sp, color: Colors.white),
                  ).setContainer(margin: EdgeInsets.only(top: 18.w)),
                  Text(
                    "歡迎使用屋測測 ! 本平台的主要目的是為閣下提供綜合式的樓宇檢測服務，助你搜羅一站式的服務承辦商，節省時間！本平台共提供29項安全性服務滿足你的需求。包括維修、漏水檢測和樓宇檢查 …… 通過全面的智能分析和專業的配對服務管理 , 為您提供“以人為本”的全新居家安全體驗 , 讓您的生活更輕鬆、更舒適。",
                    style:
                        getTextStyle(18.sp, color: Colors.white, height: 1.3),
                  ).setContainer(
                      margin:
                          EdgeInsets.only(top: 18.w, left: 42.w, right: 42.w)),
                  FormWidgets.getTextButton("教學簡介", MyColors.red_2166474,
                          icon: Icon(
                            Icons.arrow_forward,
                            size: 24.w,
                            color: Colors.white,
                          ))
                      .setContainer(
                          width: 180.w, margin: EdgeInsets.only(top: 44.w))
                      .setOnClickListener(() {
                    Get.to(GuidePage());
                  }),
                  const Spacer(),
                  Row(children: [
                    Text(
                      "略過及前往回首頁",
                      style: getTextStyle(18.sp, color: Colors.white),
                    ),
                    Icon(
                      Icons.arrow_circle_right_rounded,
                      size: 22.w,
                      color: Colors.white,
                    )
                  ])
                      .setContainer(
                          margin: EdgeInsets.only(left: 20.w, bottom: 30.w))
                      .setOnClickListener(() {
                    Get.offAll(const ClientRootPage());
                  }),
                ],
              ),
            )),
          ],
        ),
      ),
    );
  }
}
